import request from '@/utils/request'

// 获取面经列表
export const getArticle = (params) => {
  return request({
    url: '/admin/interview/query',
    params
  })
}

// 面经创建
export const addArticle = (data) => {
  return request({
    method: 'POST',
    url: '/admin/interview/create',
    data
  })
}

// 删除面经
export const delArticle = (id) => {
  return request({
    method: 'DELETE',
    url: '/admin/interview/remove',
    data: { id }
  })
}

// 获取单个面经详情
export const getEachArticle = (id) => {
  return request({
    url: '/admin/interview/show',
    params: { id }
  })
}

// 更新面经数据
export const updateArticle = (data) => {
  return request({
    method: 'PUT',
    url: '/admin/interview/update',
    data
  })
}
